<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
    <meta http-equiv="expires" content="0">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>图片管理</title>
    <script th:src="@{/webjars/jquery/3.4.1/jquery.js}"></script>
    <script th:src="@{/webjars/bootstrap/4.0.0/js/bootstrap.js}"></script>
    <script th:src="@{/js/Mimage.js}"></script>
    <link th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}" rel="stylesheet"/>
    <link th:href="@{/css/Mimage.css}" rel="stylesheet"/>
</head>
<body>

<div class="container-fluid">

    <h1 class="text-center">图片资源管理<small><a th:href="@{/mIndex}">后台首页</a></small></h1>

    <div id="reptile" class="row form-inline">
        <div class="form-group col-md-3 col-sm-12 col-12 row">
            <input type="text" class="form-control" id="urlName" placeholder="请输入需要爬取网页的URL">
        </div>
        <div class="form-group col-md-3 col-sm-12 col-12 row">
            <input type="text" class="form-control" id="ImageTag" placeholder="请输入image的标签">
        </div>
        <div class="form-group col-md-3 col-sm-12 col-12 row">
            <input type="text" class="form-control" id="ImageNameTag" placeholder="请输入image标题的标签">
        </div>
        <div class="col-md-3 col-sm-12 col-12 row">
            <button id="reptileStart" class="btn">爬取</button>
        </div>
    </div>

    <div>
        <table id="resourceTable" class="table table-bordered table-hover text-center">
            <tr style="background-color:lightgray;">
                <td>图片编号</td>
                <td>图片名字</td>
                <td>图片保存地址</td>
                <td>图片来源</td>
                <td>保存时间</td>
                <td>操作</td>
            </tr>
            <tr class="resourceList" th:each="pages,userStat:${page}">
                <td>[[${userStat.index}]]</td>
                <td>[[${pages.imageName}]]</td>
                <td>[[${pages.imageLocalPath}]]</td>
                <td>[[${pages.imageUrlPath}]]</td>
                <td>[[${pages.imageSaveDate}]]</td>
                <td><a th:alt="${pages.imageId}">删除</a></td>
            </tr>
        </table>
    </div>
    <div class="col-md-6 offset-md-3 col-sm-8 offset-sm-2 col-12">
        <div id="paging" class="text-center">
            <a th:if="${pageNumber>0}" id="PreviousPage">上一页</a>
            第<span id="NowPage">[[${pageNumber}]]</span><span>/</span><span>[[${pageNumbers}]]</span>页
            <a th:if="${pageNumber<pageNumbers}" id="NextPage">下一页</a>
        </div>
    </div>
    <div th:replace="Login::foot"></div>
</div>
</body>
</html>